<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jquery.min.js"></script>
</head>
<style>
    div{
        width: 100px;
        height: 100px;
        background-color: orange;
    }
</style>
<body>
    <div></div>
    <script>
        $(document).on('click',function(){
            alert('document');
        });
        $('div').on('click',function(e){
            alert('div');
            e.stopPropagation();   //阻止事件冒泡
        })
    </script>
</body>
</html>